package TestPaperSystem.controller;


import TestPaperSystem.Dto.PaperVo;
import TestPaperSystem.service.SimilarityService;
import TestPaperSystem.utils.R;
import TestPaperSystem.utils.ResponseUtils_R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xwj
 * @since 2023-05-03
 */
@RestController
@RequestMapping("/similarity")
public class SimilarityController {

    @Autowired
    SimilarityService similarityService;

    @PostMapping("/getExamSimilarity")
    public R examSimilarity(@RequestBody PaperVo paperVo){

        return ResponseUtils_R.success(similarityService.getByExamId(paperVo.getExamId()));

    }
}

